package common

import (
	"github.com/jinzhu/gorm"
	"managementsystem/pkg/utils"
)

//查询单个学生的所有成绩(视图)
func SelectScore(db *gorm.DB, Sno string) []utils.StudentScore{

	var Results []utils.StudentScore
	err := db.Table("scoresearch").Where("sno= ?", Sno).Scan(&Results).Error
	utils.ErrCheck(err)

	return Results

}
